<%@ page language="java" contentType="application/x-javascript; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/commons/pages/taglibs.jsp" %>

<c:forEach var="cur" items="${typeInfoList}" varStatus="vs">
function format${cur.type_sign}(value) {
	<c:set var="type_codes" value="${fn:split(cur.type_value, ',')}" />
	<c:set var="type_names" value="${fn:split(cur.type_name , ',')}" />
	switch (value) {
	<c:forEach var="cur1" begin="0" end="${fn:length(type_codes) - 1}" varStatus="vs1">
		case ${type_codes[vs1.index]}:return '${type_names[vs1.index]}';
	</c:forEach>
	}
}

function style${cur.type_sign}(value) {
	<c:if test="${not empty(cur.type_style)}">
	<c:set var="type_styles" value="${fn:split(cur.type_style , ',')}" />
	switch (value) {
	<c:forEach var="cur1" begin="0" end="${fn:length(type_codes) - 1}" varStatus="vs1">
	case ${type_codes[vs1.index]}:return '${type_styles[vs1.index]}';
	</c:forEach>
	}
	</c:if>
}

</c:forEach>

function formatActionIcon(value) {
	value = value || 'iconx-sys';
	return '<span class="iconx ' + value + '">&nbsp;</span>';
}

function formatName(value, rowData) {
	return '　　　'.substring(0, rowData.mod_level) + value;
}